/**
 * 
 */
package neptune.manager.storage;

import java.io.File;

import neptune.manager.utils.DebugLog;

/**
 * @author Roberto Bifulco [RobertoBifulco.it] [info@robertoBifulco.it]
 *
 */
public class XMLClusterStorageFactory implements ClusterStorageFactory {

	private String filepath;

	public XMLClusterStorageFactory(String filepath) {
		if (!filepath.endsWith(File.separator)) {
			filepath += File.separator;
		}
		this.filepath = filepath;
	}
	
	/* (non-Javadoc)
	 * @see neptune.manager.storage.ClusterStorageFactory#getClusterStorage()
	 */
	@Override
	public ClusterStorage getClusterStorage() {
		DebugLog.printDetailedLog("Creating XMLClusterStorage",
				XMLClusterStorageFactory.class.getSimpleName());
		return new XMLClusterStorage(new File(filepath));
	}

}
